From 46674d07dfa5670f7ae0863d1b1e4e5f9ad333c2 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Wed, 5 Aug 2026 16:12:28 +0000 Subject: [PATCH] Add example query to GROOMINGS doc --- doc/src/tables/groomings.m4 | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/doc/src/tables/groomings.m4 b/doc/src/tables/groomings.m4 index bd25516..ee7cc9c 100644 --- a/doc/src/tables/groomings.m4 +++ b/doc/src/tables/groomings.m4 @@ -31,10 +31,6 @@ GROOMINGS |GROOMINGS_summary| -.. sidebar:: - - |DYADS helpful| - Should there be multiple individuals, whether groomer or recipient, involved in simultaneous grooming behavior, there should be multiple rows in the GROOMINGS table. @@ -68,6 +64,36 @@ see the documentation of the :ref:`EVENTS ` table. +The |DYADS| view is useful when querying GROOMINGS. + +.. code-block:: sql + :caption: Using DYADS to provide a more complete picture of groomings + + SELECT dyads.wid, dyads.type + , dyads.eid + , dyads.actor_pid, dyads.recipient_pid + , dyads.date + , dyads.animid AS focal + , dyads.commid + , dyads.start + , dyads.stop + , dyads.certainty + , dyads.actor, dyads.recipient + , dyads.style + , groomings.initiator + , groomings.terminator + , groomings.others + , groomings.extractedby + , groomings.problems + , dyads.notes + , dyads.event_notes + FROM dyads + JOIN groomings + ON (groomings.eid = dyads.eid) + WHERE dyads.behavior = 'sdb_grooming' + ORDER BY dyads.actor, dyads.date, dyads.start, dyads.stop + , dyads.recipient, dyads.eid; + .. contents:: :depth: 2 -- 2.34.1